package homework_06;

/**
 * 汽车类
 */
public class Vehicle {
    private String brand;
    private String color;
    private double speed;

    public Vehicle(){

    }

    public Vehicle(String brand,String color){
        this.brand = brand;
        this.color = color;
        this.speed = 0;
    }


    public String getBrand() {
        return brand;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public double getSpeed() {
        return speed;
    }

    public void setSpeed(double speed) {
        this.speed = speed;
    }

    public void run(){
        System.out.println("一辆"+color+"颜色的"+brand+"车在以"+speed+"的时速行驶");
    }
}
